****************************************************************************
* File-Nale: 		chicago2006_in.do
* Date:		 04/30/2018
* Author: 		Fred Batista
* Purpose: 		individual level analyses of knowledge
* Data used: 		chicago2006_in.dta
* Data Output:	Journal of Politics� paper	*/
****************************************************************************


*Gender- DD2
*Age- AGE
*Interest in India international relations - Q1
*Knowledge - Q600 Q605
*Income - DD4
*Education - DD3
*Size of place - DD6
*religion - DD5
*Weight - WEIGHT_F

* Recodes

gen man = 2 - DD2

gen woman = 1 - man

gen age = AGE

gen age_sq = age*age

gen interest = 4 - Q1

gen income = DD4

recode income (0=.)

gen education = DD3

gen size = DD6

recode size (3=0) (5=1) (6=2) (7=3)

gen muslim = DD5

recode muslim (6=1) (else=0)

gen otherreligion = DD5

recode otherreligion (2 12 = 1) (else=0)

gen weight = WEIGHT_F

* knowledge items

gen euro = Q600

recode euro (1=1) (else=0)

gen annan = Q605

recode annan (1=1) (else=0)

gen euro2 = Q600

recode euro2 (1=2) (2=1) (3 99=0)

gen annan2 = Q605

recode annan2 (1=2) (99=0)

* ANALYSES

***item analyses

* discrimination

alpha euro annan

* difficulty

summarize euro annan [aweight=weight]

*** Models

* Euro

khb probit euro man || size income education age age_sq interest muslim otherreligion [pweight=weight]

probit euro man size income education age age_sq interest muslim otherreligion [pweight=weight]

mlogit euro2 woman size income education age age_sq interest muslim otherreligion [pweight=weight], base(2)

* Koffi Annan

khb probit annan man || size income education age age_sq interest muslim otherreligion [pweight=weight]

probit annan man size income education age age_sq interest muslim otherreligion [pweight=weight]

mlogit annan2 woman size income education age age_sq interest muslim otherreligion [pweight=weight], base(2)


